package com.baizhiedu.aop;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

/**
 * ClassName: MyAspect
 * Description:
 * Date: 2022/12/04 AM 12:47:24
 * <p>
 * project: spring5
 * package: com.baizhiedu.aop
 * email: 1085844536@qq.com
 * version:
 *
 * @author WangGuojian
 */
@Aspect
@Component
public class MyAspect {

    @Pointcut("execution(* com.baizhiedu.aop..*.*(..))")
    public void pointcut() {

    }

    @Around("pointcut()")
    public Object around(ProceedingJoinPoint joinPoint) throws Throwable {
        System.out.println("---Log---");
        return joinPoint.proceed();
    }
}
